﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WqHtmlAnchorSpider
{
    public enum AnchorType
    {
        Selfie
    }

    public class AnchorObj
    {
        public AnchorObj()
        {
            
        }

        public AnchorObj(anchors anchor)
        {
            Type = anchor.type;
            Name = anchor.name;
            Href = anchor.href;
        }

        public String Type { get; set; } = AnchorType.Selfie.ToString();

        public String Name { get; set; }

        public String Href { get; set; }

        public string GetHtmlNode()
        {
            return @"<a href=""" + Href +   @""">" +  Name + "</a><br/>";
        }

        public anchors GetDbAnchor()
        {
            return new anchors() { type = Type, name = Name, href = Href };
        }
    }
}
